﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Pay.Data {
	public partial class UserFeedBackMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<UserFeedBack> {
		public UserFeedBackMap() {
			// table
			ToTable("mc_UserFeedBack", "dbo");

			// keys
			HasKey(t => t.Id);

			// Properties
			Property(t => t.Id)
				.HasColumnName("Id")
				.HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
				.IsRequired();
            Property(t => t.UserId)
            .HasColumnName("UserId")
            .IsRequired();
            Property(t => t.UserFeedBackContent)
             .HasColumnName("UserFeedBackContent")
             .HasMaxLength(1000)
             .IsRequired();
            Property(t => t.UserContact)
               .HasColumnName("UserContact")
              .HasMaxLength(50)
               .IsOptional();
            Property(t => t.CreateTime)
             .HasColumnName("CreateTime")
             .IsRequired();
            HasRequired(t => t.Merchant)
               .WithMany()
               .HasForeignKey(d => d.UserId)
               .WillCascadeOnDelete(false);

        }

	}
}
